<template>
  <view class="container">
	  <u-navbar title="注销账号"></u-navbar>
    <view class="header">
      <text class="title">注销当前账号</text>
      <text class="subtitle">将（{{userInfo.userName}}）所绑定的账号注销</text>
    </view>
    
    <view class="warning-box">
      <text class="warning-text"> 注销账号为不可恢复操作，注销账号后您</text>
      <text class="warning-text">将无法找回本账号，及本账号相关的内容与信息；</text>
    </view>
    
    <view class="content">
      <text class="content-text">在您注销司空密信账号之前，请您认真阅读，理解并同意以</text>
      <text class="content-text">下内容：</text>
      
      <view class="condition-item">
        <text class="condition-number">1.</text>
        <text class="condition-text">注销账号需满足以下条件：</text>
      </view>
      <view class="indent-item">
        <text class="bullet">-</text>
        <text class="indent-text">没有资产、欠款、未结清的资金和虚拟权益；</text>
      </view>
      <view class="indent-item">
        <text class="bullet">-</text>
        <text class="indent-text">账号状态正常；</text>
      </view>
      
      <view class="condition-item">
        <text class="condition-number">2.</text>
        <text class="condition-text">注销账号后您将无法找回本账号，及账号相关的任何内</text>
      </view>
      <view class="indent-text-wrap">
        <text class="indent-text">容与信息，包括但不限于：</text>
      </view>
      <view class="indent-item">
        <text class="bullet">-</text>				
        <text class="indent-text">账号内的个人资料,个人实名信息等操作的内容；</text>
      </view>
      <view class="indent-item">
        <text class="bullet">-</text>
        <text class="indent-text">账号内产生的虚拟权益等；</text>
      </view>
      
      <view class="condition-item">
        <text class="condition-number">3.</text>
        <text class="condition-text">注销账号并不代表注销前的账号中的行为相关责任得到</text>
      </view>
      <view class="indent-text-wrap">
        <text class="indent-text">豁免或减轻。</text>
      </view>
    </view>
    
    <view class="footer">
      <button class="cancel-btn" @click="handleCancel">我理解并同意，仍要注销</button>
    </view>
  </view>
</template>

<script>
	import {mapGetters,mapActions} from "vuex"
export default {
	
	computed:{
		...mapGetters('user',['userInfo']),

	},
  methods: {
    handleCancel() {
      // Handle account cancellation logic here
      uni.showModal({
        title: '确认注销',
        content: '您确定要注销当前账号吗？此操作不可恢复。',
        success: function (res) {
          if (res.confirm) {
         uni.navigateTo({
         				url:'/pages/login/reault'
         			})
            // Perform actual cancellation
          }
        }
      });
    }
  }
}
</script>

<style>
.container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  min-height: 100vh;
}

.header {
  margin-bottom: 20px;
}

.title {
  font-size: 18px;
  font-weight: bold;
  color: #333333;
  display: block;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 14px;
  color: #666666;
}

.warning-box {
  background-color: #FFF8E6;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.warning-text {
  font-size: 14px;
  color: #FF6A00;
  display: block;
  line-height: 1.5;
}

.content {
  margin-bottom: 30px;
}

.content-text {
  font-size: 14px;
  color: #333333;
  display: block;
  line-height: 1.5;
}

.condition-item {
  display: flex;
  margin-top: 15px;
  margin-bottom: 5px;
}

.condition-number {
  font-size: 14px;
  color: #333333;
  font-weight: bold;
  margin-right: 5px;
}

.condition-text {
  font-size: 14px;
  color: #333333;
}

.indent-item {
  display: flex;
  margin-left: 20px;
  margin-bottom: 5px;
}

.indent-text-wrap {
  margin-left: 20px;
  margin-bottom: 5px;
}

.indent-text {
  font-size: 14px;
  color: #333333;
}

.bullet {
  font-size: 14px;
  color: #333333;
  margin-right: 5px;
}

.footer {
  margin-top: auto;
  padding: 20px 0;
}

.cancel-btn {
  background-color: #FF3B30;
  color: #FFFFFF;
  border-radius: 20px;
  font-size: 16px;
  height: 40px;
  line-height: 40px;
  text-align: center;
}
</style>